package net.telesing.tcmc.back.model;

import java.sql.Date;

import net.telesing.tcmc.common.BaseModel;

import org.nutz.dao.entity.annotation.Column;
import org.nutz.dao.entity.annotation.Readonly;
import org.nutz.dao.entity.annotation.Table;
import org.nutz.dao.entity.annotation.View;

/**
 * 证书信息日志Model
 *
 * Created by Zmt on 2015/11/3.
 */
@View("vsc_certificate")
@Table("tsc_certificate")
public class CertificateModel extends BaseModel
{
    public static final int TYPE_GENERATE = 1,  // 生成证书
            TYPE_IDENTIFY = 2,  // 识别证书
            TYPE_ALL = 3;  // 全部证书

    public static final int FROM_WEB = 1,  // 网站生成
            FROM_API = 2;  // 接口生成

    @Column
    private long sid;  // 所属号段ID

    @Column
    private int type;  // 证书类型

    @Column("RISE_TIME")
    private Date time;  // 生成时间

    @Column("RISE_FROM")
    private int origin;  // 生成来源

    @Column("ORIGIN_NAME")
    @Readonly
    private String originName;

    @Column("TYPE_NAME")
    @Readonly
    private String typeName;

    @Column("RISE_IP_ADDR")
    private String ip;  // 生成来源IP

    @Column
    private String content;  // 证书内容

    @Column("C_PATH")
    private String path;  // 证书地址

    @Column("VALID_DATE")
    private Date validDate;  // 有效期

    @Column("C_ORG")
    private String mOrg;  // 指派机构
    
    @Column("SECTION_NAME")
    @Readonly
    private String sName;

    @Column("SECTION_VALID_DATE")
    @Readonly
    private Date sValidDate;

    @Column("ORGANIZATION_NAME")
    @Readonly
    private String oName;
    
    public Long getSid()
    {
        return sid;
    }

    public void setSid(Long sid)
    {
        this.sid = sid;
    }

    public String getPath()
    {
        return path;
    }

    public void setPath(String path)
    {
        this.path = path;
    }

    public Date getValidDate()
    {
        return validDate;
    }

    public void setValidDate(Date validDate)
    {
        this.validDate = validDate;
    }

    public String getmOrg()
    {
        return mOrg;
    }

    public void setmOrg(String mOrg)
    {
        this.mOrg = mOrg;
    }

    public String getsName()
    {
        return sName;
    }

    public void setsName(String sName)
    {
        this.sName = sName;
    }

    public Date getsValidDate()
    {
        return sValidDate;
    }

    public void setsValidDate(Date sValidDate)
    {
        this.sValidDate = sValidDate;
    }

    public String getoName()
    {
        return oName;
    }

    public void setoName(String oName)
    {
        this.oName = oName;
    }

    public int getType()
    {
        return type;
    }

    public void setType(int type)
    {
        this.type = type;
    }

    public Date getTime()
    {
        return time;
    }

    public void setTime(Date time)
    {
        this.time = time;
    }

    public int getOrigin()
    {
        return origin;
    }

    public void setOrigin(int origin)
    {
        this.origin = origin;
    }

    public String getIp()
    {
        return ip;
    }

    public void setIp(String ip)
    {
        this.ip = ip;
    }

    public String getContent()
    {
        return content;
    }

    public void setContent(String content)
    {
        this.content = content;
    }

    public String getTypeName()
    {
        return typeName;
    }

    public void setTypeName(String typeName)
    {
        this.typeName = typeName;
    }

    public String getOriginName()
    {
        return originName;
    }

    public void setOriginName(String originName)
    {
        this.originName = originName;
    }

}
